// app.js
App({

    globalData: {
        appId: ""
    },
    onLaunch() {
        let accInfo = wx.getAccountInfoSync();

        this.globalData.appId = accInfo.miniProgram.appId

        console.log(accInfo.miniProgram.appId);
    }

})